
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>接口自动化测试报告</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

    <style type="text/css" media="screen">
        pre {
            white-space: pre-wrap;
            white-space: -moz-pre-wrap;
            white-space: -pre-wrap;
            white-space: -o-pre-wrap;
            word-wrap: break-word;
            text-align: left;
        }
    
        body {
            font-family: Microsoft YaHei, Tahoma, arial, helvetica, sans-serif;
            padding: 20px;
            font-size: 80%;
        }

        table {
            font-size: 100%;
        }

        /* -- heading ---------------------------------------------------------------------- */
        .heading {
            margin-top: 0ex;
            margin-bottom: 1ex;
        }

        .heading .description {
            margin-top: 4ex;
            margin-bottom: 6ex;
        }

        /* -- report ------------------------------------------------------------------------ */
        #total_row {
            font-weight: bold;
        }

        .passCase {
            color: #5cb85c;
        }

        .failCase {
            color: #f0ad4e;
            font-weight: bold;
        }

        .errorCase {        
            color: #d9534f;
            font-weight: bold;
        }

        .hiddenRow {
            display: none;
        }

        .testcase {
            margin-left: 2em;
        }
    </style>

</head>
<script language="javascript" type="text/javascript">
    output_list = Array();


    function showCase(level) {
        trs = document.getElementsByTagName("tr");
        for (var i = 0; i < trs.length; i++) {
            tr = trs[i];
            id = tr.id;
            if (id.substr(0, 2) == 'pt') {
                if (level == 1 || level == 4) {
                    tr.className = '';
                }
                else {
                    tr.className = 'hiddenRow';                    
                }
            }
            if (id.substr(0, 2) == 'ft') {
                if (level == 2 || level == 4) {
                    tr.className = '';
                }
                else {
                    tr.className = 'hiddenRow';
                }
            }
            
            if (id.substr(0, 2) == 'et') {
                if (level == 3 || level == 4) {
                    tr.className = '';
                }
                else {
                    tr.className = 'hiddenRow';
                }
            }
        }

        detail_class = document.getElementsByClassName('detail');
        //console.log(detail_class.length)
        if (level == 3) {
            for (var i = 0; i < detail_class.length; i++) {
                detail_class[i].innerHTML = "收起"
            }
        }
        else {
            for (var i = 0; i < detail_class.length; i++) {
                detail_class[i].innerHTML = "详细"
            }
        }
    }

    function showClassDetail(cid, count) {
        var id_list = Array(count);
        var toHide = 1;
        for (var i = 0; i < count; i++) {
            tid0 = 't' + cid.substr(1) + '_' + (i + 1);
            console.log(tid0);
            tid = 'f' + tid0;
            tr = document.getElementById(tid);
            if (!tr) {
                tid = 'p' + tid0;
                tr = document.getElementById(tid);
            }
            if (!tr) {
                tid = 'e' + tid0;
                tr = document.getElementById(tid);
            }
            id_list[i] = tid;
            if (tr.className) {
                toHide = 0;
            }
        }
        for (var i = 0; i < count; i++) {
            tid = id_list[i];
            if (toHide) {
                document.getElementById(tid).className = 'hiddenRow';
                document.getElementById(cid).innerText = "详细"
            }
            else {
                document.getElementById(tid).className = '';
                document.getElementById(cid).innerText = "收起"
            }
        }
    }

    function html_escape(s) {
        s = s.replace(/&/g, '&amp;');
        s = s.replace(/</g, '&lt;');
        s = s.replace(/>/g, '&gt;');
        return s;
    }
</script>


<body>

<div class='heading'>
    <h1 style="font-family: Microsoft YaHei">接口自动化测试报告</h1>
    <p class='attribute'><strong>开始时间 : </strong> 2019-03-13 18:46:13</p>
    <p class='attribute'><strong>合计耗时 : </strong> 0:00:01.003057</p>
    <p class='attribute'><strong>测试结果 : </strong> 共 15，通过 8，失败 1，错误 1，跳过 5，通过率= 53.33%</p>

    <p class='description'></p>
</div>


<p id='show_detail_line'>
    <a class="btn btn-primary" href='javascript:showCase(0)'>概要{ 53.33% }</a>
    <a class="btn btn-success" href='javascript:showCase(1)'>通过{ 8 }</a>
    <a class="btn btn-warning" href='javascript:showCase(2)'>失败{ 1 }</a>
    <a class="btn btn-danger" href='javascript:showCase(3)'>错误{ 1 }</a>
    <a class="btn btn-info" href='javascript:showCase(4)'>所有{ 15 }</a>
</p>
<table id='result_table' class="table table-condensed table-bordered table-hover">
    <colgroup>
        <col align='left'/>
        <col align='right'/>
        <col align='right'/>
        <col align='right'/>
        <col align='right'/>
        <col align='right'/>
        <col align='right'/>
    </colgroup>
    <tr id='header_row' class="text-center success" style="font-weight: bold;font-size: 14px;">
        <td>用例集/测试用例</td>
        <td>总计</td>
        <td>通过</td>
        <td>失败</td>
        <td>错误</td>
        <td>跳过</td>
        <td>详细</td>
    </tr>

 
    
<tr class="failClass warning">
        <td>battle.test_tattle.TestBattle</td>
        <td class="text-center">5</td>
        <td class="text-center">5</td>
        <td class="text-center">0</td>
        <td class="text-center">0</td>
        <td class="text-center">0</td>
        <td class="text-center"><a href="javascript:showClassDetail('c1',5)" class="detail" id="c1">详细</a></td>
    </tr>

<tr id="pt1_1" class="">
        <td class="passCase">
            <div class="testcase">test_00001_start_battle（测试开始战斗）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt1_1' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_1'>通过</button>
        <div id='div_pt1_1' class="collapse">
                <pre>测试开始战斗
</pre>
            </div>
        </td>
    </tr>

<tr id="pt1_2" class="">
        <td class="passCase">
            <div class="testcase">test_00002_skill_buff（测试技能buff）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt1_2' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_2'>通过</button>
        <div id='div_pt1_2' class="collapse">
                <pre>测试技能buff
</pre>
            </div>
        </td>
    </tr>

<tr id="pt1_3" class="">
        <td class="passCase">
            <div class="testcase">test_00003_normal_attack（测试普通攻击）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt1_3' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_3'>通过</button>
        <div id='div_pt1_3' class="collapse">
                <pre>测试普通攻击
</pre>
            </div>
        </td>
    </tr>

<tr id="pt1_4" class="">
        <td class="passCase">
            <div class="testcase">test_00004_get_battle_reward_00001_1000_100（测试领取战斗奖励）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt1_4' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_4'>通过</button>
        <div id='div_pt1_4' class="collapse">
                <pre>{'gold': 1000, 'diamond': 100}
测试领取战斗奖励，获得的钻石数量是：100
</pre>
            </div>
        </td>
    </tr>

<tr id="pt1_5" class="">
        <td class="passCase">
            <div class="testcase">test_00005_get_battle_reward_00002_2000_200（测试领取战斗奖励）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt1_5' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_5'>通过</button>
        <div id='div_pt1_5' class="collapse">
                <pre>{'gold': 2000, 'diamond': 200}
测试领取战斗奖励，获得的钻石数量是：200
</pre>
            </div>
        </td>
    </tr>

<tr class="failClass warning">
        <td>chat.test_chat.TestChat</td>
        <td class="text-center">3</td>
        <td class="text-center">0</td>
        <td class="text-center">0</td>
        <td class="text-center">1</td>
        <td class="text-center">2</td>
        <td class="text-center"><a href="javascript:showClassDetail('c2',3)" class="detail" id="c2">详细</a></td>
    </tr>

<tr id="et2_1" class="">
    <td class="errorCase"><div class="testcase">test_00006_chat_in_world_channel（测试世界聊天）</div></td>
    <td colspan="6" align="center">
    <!--默认收起错误信息
    <button id='btn_et1_5' type="button"  class="btn btn-danger btn-xs collapsed" data-toggle="collapse" data-target='#div_et1_5'>错误</button>
    <div id='div_et1_5' class="collapse">  -->

    <!-- 默认展开错误信息 -->
    <button id="btn_et2_1" type="button" class="btn btn-danger btn-xs" data-toggle="collapse" data-target="#div_et2_1">错误</button>
    <div id="div_et2_1" class="collapse in">
        <pre>测试世界聊天
Traceback (most recent call last):
  File "D:\github\utx\utx\core.py", line 101, in wrap
    result = func(*args, **kwargs)
  File "D:\github\utx\demo\testcase\chat\test_chat.py", line 15, in test_chat_in_world_channel
    raise Exception("运行报错了")
Exception: 运行报错了
</pre>
    </div>
    </td>
</tr>

<tr id="pt2_2" class="">
        <td class="passCase">
            <div class="testcase">test_00007_chat_in_personal_channel（测试私聊）</div>
        </td>
        <td colspan="6" align="center">
        <span class="label label-info success">跳过</span>
        </td>
    </tr>

<tr id="pt2_3" class="">
        <td class="passCase">
            <div class="testcase">test_00008_chat_in_union_channel（测试公会聊天）</div>
        </td>
        <td colspan="6" align="center">
        <span class="label label-info success">跳过</span>
        </td>
    </tr>

<tr class="failClass warning">
        <td>legion.test_legion.TestLegion</td>
        <td class="text-center">7</td>
        <td class="text-center">3</td>
        <td class="text-center">1</td>
        <td class="text-center">0</td>
        <td class="text-center">3</td>
        <td class="text-center"><a href="javascript:showClassDetail('c3',7)" class="detail" id="c3">详细</a></td>
    </tr>

<tr id="pt3_1" class="">
        <td class="passCase">
            <div class="testcase">test_00009_create_legion（测试创建军团）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt3_1' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt3_1'>通过</button>
        <div id='div_pt3_1' class="collapse">
                <pre>运行setUp方法
运行tearDown方法
</pre>
            </div>
        </td>
    </tr>

<tr id="pt3_2" class="">
        <td class="passCase">
            <div class="testcase">test_00010_bless_00001_gold_100（测试公会祈福）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt3_2' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt3_2'>通过</button>
        <div id='div_pt3_2' class="collapse">
                <pre>运行setUp方法
gold
100
运行tearDown方法
</pre>
            </div>
        </td>
    </tr>

<tr id="pt3_3" class="">
        <td class="passCase">
            <div class="testcase">test_00011_bless_00002_diamond_500（测试公会祈福）</div>
        </td>
        <td colspan="6" align="center">
       
        <button id='btn_pt3_3' type="button"  class="btn btn-success btn-xs collapsed" data-toggle="collapse" data-target='#div_pt3_3'>通过</button>
        <div id='div_pt3_3' class="collapse">
                <pre>运行setUp方法
diamond
500
运行tearDown方法
</pre>
            </div>
        </td>
    </tr>

<tr id="pt3_4" class="">
        <td class="passCase">
            <div class="testcase">test_00012_receive_bless_box_00001_10001（测试领取祈福宝箱）</div>
        </td>
        <td colspan="6" align="center">
        <span class="label label-info success">跳过</span>
        </td>
    </tr>

<tr id="pt3_5" class="">
        <td class="passCase">
            <div class="testcase">test_00013_receive_bless_box_00002_10002（测试领取祈福宝箱）</div>
        </td>
        <td colspan="6" align="center">
        <span class="label label-info success">跳过</span>
        </td>
    </tr>

<tr id="pt3_6" class="">
        <td class="passCase">
            <div class="testcase">test_00014_receive_bless_box_00003_10003（测试领取祈福宝箱）</div>
        </td>
        <td colspan="6" align="center">
        <span class="label label-info success">跳过</span>
        </td>
    </tr>

<tr id="ft3_7" class="">
        <td class="failCase">
            <div class="testcase">test_00015_quit_legion（测试退出军团）</div>
        </td>
        <td colspan="6" align="center">
            <!--默认收起错误信息
            <button id='btn_ft1_2' type="button"  class="btn btn-danger btn-xs collapsed" data-toggle="collapse" data-target='#div_ft1_2'>失败</button>
            <div id='div_ft1_2' class="collapse">  -->

            <!-- 默认展开错误信息 -->
            <button id="btn_ft3_7" type="button" class="btn btn-warning btn-xs" data-toggle="collapse" data-target="#div_ft3_7">失败</button>
            <div id="div_ft3_7" class="collapse in">
                <pre>运行setUp方法
测试退出军团
运行tearDown方法
Traceback (most recent call last):
  File "D:\github\utx\utx\core.py", line 101, in wrap
    result = func(*args, **kwargs)
  File "D:\github\utx\demo\testcase\legion\test_legion.py", line 50, in test_quit_legion
    assert 1 == 2
AssertionError
</pre>
            </div>
        </td>
    </tr>


    <tr id='total_row' class="text-center active">
        <td>总计</td>
        <td>15</td>
        <td>8</td>
        <td>1</td>
        <td>1</td>
        <td>5</td>
        <td>通过率：53.33%</td>
    </tr>
</table>

<div id='ending'>&nbsp;</div>
<div style=" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer">
    <a href="#"><span class="glyphicon glyphicon-eject" style="font-size:30px;" aria-hidden="true">
    </span></a></div>


</body>
</html>
